package com.etc.service.impl;

import com.etc.dao.HouseholdDao;
import com.etc.entity.Household;
import com.etc.service.HouseholdService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
public class HouseServiceImpl implements HouseholdService {
    @Resource
    private HouseholdDao householdDao;
    @Override
    public List<Household> findAllHousehold() {
        return householdDao.findAllHousehold();
    }

    @Override
    public List<Household> findByAnyCondition(Map<String, Object> map) {
        return householdDao.findByAnyCondition(map);
    }

    @Override
    public Household findById(Integer id) {
        return householdDao.findById(id);
    }

    @Override
    public List<Household> findByRoom(Integer room_id) {
        return householdDao.findByRoom(room_id);
    }

    @Override
    public List<Household> findInByTime(Date fromtime, Date totime) {
        return householdDao.findInByTime(fromtime,totime);
    }

    @Override
    public List<Household> findOutByTime(Date fromtime, Date totime) {
        return householdDao.findOutByTime(fromtime,totime);
    }

    @Override
    public List<Household> findByPark(Integer id) {
        return householdDao.findByPark(id);
    }

    @Override
    public List<Household> findByBuilding(Integer id) {
        return householdDao.findByBuilding(id);
    }

    @Override
    public List<Household> findByOwner(Integer id) {
        return householdDao.findByOwner(id);
    }

}
